/**
*      author: Y_Yao
*      created: 2024-09-23 12:27:12
**/

//#include<bits/stdc++.h>
#include<iostream>
#include<vector>
#include<queue>

using namespace std;
using LL = long long;
const int INF = 0x3f3f3f3f;
int a,b,c,A,B;
vector<int> ret;
// 0 1 2 3 4 5
void FILL(int& x,int& y,int i)
{
    if(i == 1) x = a;
    else if(i == 2) y = b;
}

void DROP(int& x,int& y,int i)
{
    if(i == 1) x = 0;
    else if(i == 2) y = 0;
}

void POUR1(int& x,int& y,int i)
{

    if(i == 1)
    {    
        int tmp = b - y;
        if(x >= tmp)
        {
            x -= tmp;
            y = b;
        }
        else
        {
            y += x;
            x = 0;
        }
    }
    else
    {
        int tmp = a - x;
        if(y >= tmp)
        {
            y -= tmp;
            x = a;
        }
        else
        {
            x += y;
            y = 0;
        }
    }
}

struct node
{
    int x,y;
    int last;
    vector<int> path;
};

void bfs()
{   
    struct node t;
    t.x =  t.y = 0;
    t.last = -1;
    
    queue<node> q;
    q.push(t);

    while(!q.empty())
    {
        auto tmp = q.front();
        q.pop();
        tmp.path.push_back(tmp.last);

        if(tmp.x == c || tmp.y == c)
        {
            ret = tmp.path;
            return;
        }
        if(tmp.x == 0 && tmp.y == 0 && tmp.last != -1)
            continue;

        for(int i = 0;i < 6;i++)
        {
            auto tmp2 = tmp;
            if(i == 0) FILL(tmp2.x,tmp2.y,1);
            else if(i == 1) FILL(tmp2.x,tmp2.y,2);
            else if(i == 2) DROP(tmp2.x,tmp2.y,1);
            else if(i == 3) DROP(tmp2.x,tmp2.y,2);
            else if(i == 4) POUR1(tmp2.x,tmp2.y,1);
            else if(i == 5) POUR1(tmp2.x,tmp2.y,2);
            tmp2.last = i;
            q.push(tmp2);
        }
    }
}

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cin >> a >> b >> c;

    bfs();

    if(ret.empty())
    {
        cout << "impossible" << endl;
        return 0;
    }
    cout<<ret.size()-1<<endl;
    for(int i = 0;i < ret.size();i++)
    {
        if(ret[i] == 0) cout<<"FILL(1)"<<endl;
        if(ret[i] == 1) cout<<"FILL(2)"<<endl;
        if(ret[i] == 2) cout<<"DROP(1)"<<endl;
        if(ret[i] == 3) cout<<"DROP(2)"<<endl;
        if(ret[i] == 4) cout<<"FOUR(1,2)"<<endl;
        if(ret[i] == 5) cout<<"FOUR(2,1)"<<endl;
    }
    return 0;
}